<!-- 列表 -->
<extend name="Public:layout" />
<block name="title"><{$authName}></block>

<block name="pluginCSS">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/select2/select2.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/select2/select2-metronic.css"/>
</block>
<block name="CSS"></block>

<block name="loadJS">
<script type="text/javascript" src="__PUBLIC__/Admin/plugins/select2/select2.min.js"></script>
<script src="__PUBLIC__/admin/scripts/layer/layer.js" type="text/javascript"></script>  


</block>
<block name="setJS">
<script>
var ajaxUrl="<{:U('index')}>";
 
function edit(){
     var params = {};
     params.content = $.trim($('#content').val());
     params.id = $('#id').val();
     params.ajax="setRefund";   
     $.post(ajaxUrl,params,function(data){
      if(data="other"){
        layer.msg('该单已退款，请不要重复提交',{icon:1,time:2000});        
        location.href='<{:U("refund")}>';
      }
      if(data){
        layer.msg('退款成功!',{icon:1,time:2000});        
        location.href='<{:U("refund")}>';
      }else{
        layer.msg('退款失败!',{icon:0,time:2000});
        return;
      }
    });
}
</script>
</block>
<block name="initJS">
$('.form-horizontal button.rf').click(function(e){
      e.preventDefault();
      edit();
    }); 
</block>

<block name="pagetitle">增删改查</block>
<block name="page">
   

   <div class="row">
  <div class="col-md-12">

    <div class="portlet">
      <div class="portlet-title">
        <div class="caption">
          <i class="fa <{$authIco}>"></i><{$authName}>
        </div>
        
        <div class="actions">
          <a class="btn default green-stripe" id="table_manager_new" data-toggle="modal" href="<{$referer}>">
            <i class="fa fa-reply"></i>
            <span class="hidden-480">返回</span>
          </a>
        </div>
        
      </div>
      <div class="portlet-body">
       <form class="form-horizontal" method="post">
        <input type='hidden' id='id' value='<{$object.orderId}>'/>
        <div class="form-group">
            <label class="col-sm-2 control-label">所属订单：</label>
            <div class="col-md-6"><p class="form-control-static"><{$object['orderNo']}></p>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">订单金额：</label>
            <div class="col-md-6"><p class="form-control-static">订单总金额：<font color='red'>&yen; <{$object['totalMoney']+$object['deliverMoney']}></font>&nbsp;(商品总金额：&yen; <{$object['totalMoney']}> + 运费：&yen; <{$object['deliverMoney']}>)</p>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">退款说明：</label>
            <div class="col-md-6">
            <textarea id='content' name='content' row="3" class="form-control"></textarea>
            </div>
          </div>
          <div class="form-group fluid">
                    <div class="col-md-offset-2 col-md-9">
                      <button type="submit" class="rf btn blue" >保存</button>
                      <button type="reset" class="btn default">取消</button>
                    </div>
                  </div>
       </form>
       </div>
    </div>
  </div>
</div>
</block>